/*
   Copyright 2009 Abdulla Abdurakhmanov (abdulla@latestbit.com)
   Original sources are available at www.latestbit.com

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package org.latestbit.smartobjects;
import java.util.Date;

import org.latestbit.smartobjects.core.*;

/**
 * Interface provide access to all basic/system information for skeletons or remote smart objects stubs 
 * @author abdulla-a
 */
public interface ISmartObject extends IDestroyable {
	/**
	 * Gets IDL interface id(name)
	 * @return IDL interface id
	 */
	public String getInterfaceId();
	
	/**
	 * Gets all supported inherited interfaces 
	 * @return IDL interface ids for all supported interfaces
	 */
	public String[] getSupportedInterfaces();
	
	/**
	 * Gets instance id for session/stateful smart object
	 * @return Stringified instance id
	 */
	public String getInstanceId();
	
	/**
	 * Gets bus where this object is located
	 * @return ISmartObject instance
	 */
	public ISmartBus getBus();
	
	/**
	 * Gets last activity time for this object
	 * @return last activity time
	 */
	public Date getLastActivityTime();
	
	/**
	 * Gets bus network server where this object is published
	 * @return Bus network server or null, if not published
	 */
	public SmartBusServer getBusServer();
	
	/**
	 * Gets bus network client where this object is resolved
	 * @return Bus network client or null, if not resolved
	 */	
	public SmartBusClient getBusClient();
	
}
